-- GENERATED SPELL FOR [Black Dragonspawn] --


function spell0_7040(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7040', 581, 1)
end

function spell1_7040(pUnit, Event) --@Rend,n/a--
pUnit:FullCastSpellOnTarget(12054,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7040', 15000, 1)
end

function Sorts_7040(pUnit, Event)
local choix_sorts_7040 = math.random(0, 1)
if choix_sorts_7040 == 0 then
pUnit:RegisterEvent('spell0_7040', 1, 1)
end
if choix_sorts_7040 == 1 then
pUnit:RegisterEvent('spell1_7040', 1, 1)
end
end

function mob7040_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7040', math.random(1500, 3000), 1)
end

function mob7040_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7040_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7040_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7040, 1, 'mob7040_Action')
RegisterUnitEvent(7040, 2, 'mob7040_Leave')
RegisterUnitEvent(7040, 3, 'mob7040_Kill')
RegisterUnitEvent(7040, 4, 'mob7040_Die')
